package com.allwees.bs.c.module.order.context.compute.handler;

import com.allwees.bs.c.module.order.context.bo.CouponComputeBo;
import com.allwees.bs.c.module.order.context.bo.UserCouponBo;
import com.allwees.bs.c.module.order.context.compute.ComputeHandler;
import com.allwees.bs.c.module.order.context.compute.strategy.coupon.CouponCashStrategy;
import org.springframework.stereotype.Component;

@Component
public class CashHandler extends ComputeHandler {

    private final static CouponCashStrategy couponCashStrategy = new CouponCashStrategy();

    @Override
    public void handler(UserCouponBo coupon, CouponComputeBo request) {
        couponCashStrategy.use(coupon, request);
        doNext(coupon, request);
    }
}
